#ifndef TOOL_H
#define TOOL_H

/*
  Things to do...

  1. Consider more methods for implementation by subclasses
  2. Relatiionship between Tool and ToolCategory (should Tool contain only pointer to category or some additional data should be required)
  3. Layout of buttons (e.g. while registering them, and their positions in ToolCategory widget )

  */

#include <State>

class ToolCategory;

class Tool : public State
{
    Q_OBJECT

public:
    ~Tool();
    virtual QString name() const = 0;
    virtual QString categoryName() const = 0;
    virtual QString iconPath() const = 0;
    virtual Qt::CursorShape cursorShape() const;

    QPointer<ToolCategory> toolCategory() const;
    void setToolCategory(QPointer<ToolCategory> toolCategory);

    const QIcon& icon() const;
    void setIcon(const QIcon& icon);

    virtual void onMousePress(QMouseEvent* pEvent);
    virtual void onMouseMove(QMouseEvent* pEvent);
    virtual void onMouseRelease(QMouseEvent* pEvent);

    QPointer<QWidget> propertiesWidget() const;
    virtual void initPropertiesWidget();
protected:
    explicit Tool(QObject *parent = 0);
    QPointer<QWidget> m_propertiesWidget;
private:
    QPointer<ToolCategory> m_toolCategory;
    QIcon m_icon;
signals:
    
public slots:
    
};

#endif // TOOL_H
